using System;

namespace SEVDNUG.Web.Sitefinity.Tools.DataImporter
{
    /// <summary>
    /// Contains information about the row level import exceptions.
    /// </summary>
    public class ImportException
    {
        #region Public Properties
        /// <summary>
        /// Gets or sets the index of the row that caused the exception..
        /// </summary>
        /// <value>The index of the row.</value>
        public int RowIndex { get; set;}
        /// <summary>
        /// Gets or sets the exception message text.
        /// </summary>
        /// <value>The exception message text.</value>
        public string ExMessage { get; set; }
        /// <summary>
        /// Gets or sets the Exception that was raised.
        /// </summary>
        /// <value>The Exception that was raised.</value>
        public Exception Ex { get; set; }
        #endregion Public Properties

        #region Constructors
        /// <summary>
        /// Initializes a new instance of the <see cref="ImportException"/> class.
        /// </summary>
        /// <param name="rowIndex">Index of the row that caused the exception.</param>
        /// <param name="exMessage">The exception message.</param>
        /// <param name="ex">The exception that was raised..</param>
        public ImportException(int rowIndex, string exMessage, Exception ex)
        {
            this.RowIndex = rowIndex;
            this.ExMessage = exMessage;
            this.Ex = ex;
        }
        #endregion Constructors
    }
}